<div ng-controller="fileCtrl">


	<div class="row">

		<div class="mail-container">

			<div class="mail-header" style="width: 99%; margin-left: 10px;">
				<ul class="header-buttons">
					<li title="鍙嶅簭" ng-click="reverseFiles()"><a class="tooltip-primary" data-toggle="tooltip" data-original-title="Compose"><i class="fa fa-arrow-down"></i></a></li>
					<!-- <li><a class="tooltip-primary" data-toggle="tooltip" data-original-title="Compose"><i class="fa fa-arrow-up"></i></a></li> -->
					<li title="上传文件" ng-click="uploadFiles()"><a class="tooltip-primary" data-toggle="tooltip" data-original-title="Compose"><i class="fa fa-upload"></i></a></li>
					<li title="鍒犻櫎鏂囦欢" ng-click="delFiles()"><a class="tooltip-primary" data-toggle="tooltip" data-original-title="Compose"><i class="glyphicon glyphicon-remove"></i></a></li>
				</ul>
				<ul class="header-buttons pull-right">
<!-- 					<li><a><i class="fa fa-angle-left"></i></a></li>
					<li><a><i class="fa fa-angle-right"></i></a></li> -->
					<li class="search" ng-click="#">
						<span class="input-icon">
							<input type="text" ng-keyup="keyupId()" ng-model="checkname" placeholder="鎸夌収鏂囦欢鍚嶅瓧鍘绘煡璇俊鎭�" class="form-control input-sm" id="fontawsome-search" />
							<i class="glyphicon glyphicon-search lightgray"></i>
						</span>
					</li>
				</ul>
			</div>

			<div class="mail-body" style="width: 99%; margin-left: 10px;margin-top:10px">
				<ul class="mail-list">
					<li class="list-item" ng-repeat="x in files">
						<div class="item-check">
							<label>
								<input type="checkbox" ng-value="x.id" name="checkbox"/>
								<span class="text"></span>
							</label>
						</div>
						<div class="item-sender"><span class="col-name">{{x.type | showFileType}}</span></div>
						<div class="item-subject"><a target="_blank" href="{{x.fileUrl}}" style="font-weight:bold">{{x.fileName}}</a></div>
						<div class="item-options"><a target="_blank" href="{{x.fileUrl}}"><i class="fa fa-paperclip"></i></a></div>
						<div class="item-time">{{x.date}}</div>
					</li>
			</ul>
				<pagination current-page="currentPage" total-page="totalPage" get-record="getRecord()">
				</pagination>
			</div>

		</div>
	</div>


	<!--鍒犻櫎妗�-->
	<div class="modal-preview"  ng-if="showModal">
		<div class="modal modal-primary">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" ng-click="delFiles()" data-dismiss="modal" aria-hidden="true">脳</button>
						<h4 class="modal-title">鍒犻櫎鏂囦欢</h4>
					</div>
					<div class="modal-body">
						<p>纭鍒犻櫎杩欎簺鏂囦欢锛熻璋ㄦ厧鎿嶄綔锛�</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-warning" data-dismiss="modal" ng-click="delFiles()">鍙栨秷</button>
						<button type="button" class="btn btn-primary" ng-click="sureDelFiles()">纭</button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="mask" ng-class="showModal?'show':'noshow'"></div>

	<!--上传文件弹框-->
	<div class="modal-preview"  ng-if="showUploadModal">
		<div class="modal modal-primary">
			<div class="modal-dialog">
			  <form id="uploadFilesForm" ng-submit="sureUploadFiles()">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" ng-click="uploadFiles()" data-dismiss="modal" aria-hidden="true">×</button>
						<h4 class="modal-title">上传文件</h4>
					</div>
					<div class="modal-body">
						
							<div class="form-group">
		              <div class="input-icon icon-left">
										<input class="form-control" id="sinvertedinput" name="file"  type="file" onchange="angular.element(this).scope().selectfile(this.files)" ng-model="newfile.name" required/>
										<i class="white glyphicon glyphicon-search blue"></i>
									</div>
		          </div>
							<div class="form-group">
	                <div class="input-icon icon-right">
										<input class="form-control" id="xsinput" type="text" name="fileName" placeholder="文件标题"  ng-model="newfile.title" required/>
										<!-- <i class="fa fa-times purple"></i> -->
									</div>
	            </div>
						
					</div>
					<div class="modal-footer">
						<!-- <button type="button" class="btn btn-warning" data-dismiss="modal" ng-click="uploadFiles()">取消</button> -->
						<!-- <button type="submit" class="btn btn-primary">确认上传</button> -->
						<input type="submit" value="确认上传" class="btn btn-primary"/>
					</div>
					
				</div>
			  </form>
			</div>
		</div>
	</div>
	<div class="mask" ng-class="showUploadModal?'show':'noshow'"></div>
	
</div>
